<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
Route::group(['middleware'=>['guest']],function(){
    Route::get('/', 'Home\HomeController@index');
    Route::get('foo', function () {
        return 'Hello World';
    });

    /*
     * 用户登录
     */
    Route::get('login','Auth\LoginController@login');
    Route::post('auth/login','Auth\LoginController@postLogin');
    Route::get('logout','Auth\LoginController@logout');

    /*
     * 用户管理
     */
    Route::get('admin/list','Admin\AdminController@index');
    Route::get('admin/uedit', 'Admin\AdminController@uedit');
    Route::post('admin/store', 'Admin\AdminController@store');
    Route::any('admin/det', 'Admin\AdminController@det');
	Route::get('admin/addu', 'Admin\AdminController@addu');
	Route::post('admin/addUser', 'Admin\AdminController@addUser');
	Route::get('admin/is_admin','Admin\AdminController@is_admin');
    Route::get('admin/no_admin', 'Admin\AdminController@no_admin');
    Route::get('admin/authorlist', 'Admin\AdminController@authorList');                        //平台作者列表
    Route::get('admin/authoradd', 'Admin\AdminController@authorAdd');						   //添加平台作者
    Route::post('admin/authorinsert', 'Admin\AdminController@authorInsert');				   //执行添加信息
    Route::get('admin/authoredit', 'Admin\AdminController@authorEidt');						   //编辑作者信息
    Route::post('admin/authorupdate', 'Admin\AdminController@authorUpdate');				   //执行更新作者信息
    Route::any('admin/authordel', 'Admin\AdminController@authorDelete');
    Route::get('admin/share','Admin\AdminController@share');								   //裂变者列表
	Route::get('admin/shareDetail/{userid}','Admin\AdminController@shareDetail');
	Route::get('admin/excel','Admin\AdminController@downloadExcel');
	Route::get('admin/fission/{userid}/{fission}','Admin\AdminController@fission');				//设置裂变者
	Route::get('admin/wechatName','Admin\AdminController@wechat_name');						   //微信分享列表

	/*
	 * 标签管理
	 */
	Route::get('tags/list','Tags\TagsController@index');   			// 标签列表
	Route::post('tags/addtag','Tags\TagsController@addTag');
	Route::get('tags/edittag/{id}','Tags\TagsController@editTag');
	Route::post('tags/uptag','Tags\TagsController@updateTag');
	Route::get('tags/uptagstate/{id}/{state}','Tags\TagsController@updateTagState');
	Route::get('tags/deltag/{id}','Tags\TagsController@deleteTag');

	/*
	 *课程分类管理
	*/
	Route::get('ctype/list','Ctype\CtypeController@index');
	Route::get('ctype/add','Ctype\CtypeController@create');
	Route::get('ctype/cedit','Ctype\CtypeController@edit');
	Route::post('ctype/store','Ctype\CtypeController@store');
	Route::post('ctype/usave','Ctype\CtypeController@update');
	Route::any('ctype/det', 'Ctype\CtypeController@destroy');
	Route::get('ctype/show','Ctype\CtypeController@show');
	Route::get('ctype/getCate','Ctype\CtypeController@getCate');
	Route::get('ctype/cindex/{level}/{id}','Ctype\CtypeController@cindex');//查看课程
	/*
	 * banner管理
	 */
	Route::get('banner/list','Banner\BannerController@index');
	Route::get('banner/add','Banner\BannerController@add');
	Route::any('banner/uploads','Banner\BannerController@uploads');
	Route::post('banner/insert','Banner\BannerController@insertBanner');
	Route::get('banner/editbanner/{id}','Banner\BannerController@editBanner');
	Route::post('banner/updatebanner','Banner\BannerController@updateBanner');
	Route::get('banner/upbannerstate/{id}/{state}','Banner\BannerController@updateBannerState');
	Route::get('banner/delbanner/{id}','Banner\BannerController@deleteBanner');

	/*
	 * 前端客户管理
	 */
	Route::get('user/list','User\UserController@index');                     //前端用户列表
	Route::get('user/info','User\UserController@userInfo');                     //获取用户信息
	Route::post('user/transfer/teacher','User\UserController@transferTeacher');                     //前端用户列表
	Route::get('user/upstatus', 'User\UserController@upUserStatus');	     //修改用户状态
	Route::get('user/userdetail/{user_id}', 'User\UserController@userDetail');	 //查看用户详情默认为课程详情
	Route::get('user/detailarticle/{user_id}', 'User\UserController@userDetailArticle');	 //查看用户详情默认为课程详情
	Route::get('user/detailfinancerecord/{user_id}', 'User\UserController@userDetailFinanceRecord');	 //查看用户账户流水详情
	Route::get('user/comment/{user_id}', 'User\UserController@userDetailComment');	 //查看用户评论详情
	Route::get('user/spb/{user_id}','User\UserController@spb');                     //前端用户列表
	Route::get('user/enroll','User\UserController@zsTeacher');//招生老师信息
	Route::get('user/teacher/import','User\UserController@exportTeacher');//招生老师信息
	Route::get('user/active','User\UserController@active');//招生老师信息

    /*
     * 课程管理
     */
    Route::get('course/list','Course\CourseController@index');
    Route::get('course/create','Course\CourseController@create');
    Route::post('course/preview','Course\CourseController@postView');
    Route::get('course/detail','Course\CourseController@detail');
    Route::post('course/postCreate','Course\CourseController@postCreate');
    Route::get('course/edit','Course\CourseController@edit');
    Route::post('course/postEdit','Course\CourseController@postEdit');
    Route::post('course/changeState','Course\CourseController@changeState');
    Route::post('course/delete','Course\CourseController@delete');
    Route::post('courseClass/delete','Course\CourseController@classDelete');
    Route::post('courseClass/changeState','Course\CourseController@changeClassState');
    Route::post('section/changeState','Section\CourseSectionController@changeState');
    Route::post('course/fileUpload','Course\CourseController@postUpload');
    Route::post('course/fileUploadauto','Course\CourseController@postUploadAuto');         //将图片上传到本项目内部
    Route::post('course/push','Course\CourseController@pushMessage');
	Route::get('author/choose','Course\CourseController@selectAuthor');
    Route::get('course/consultation','Course\CourseController@consultation');               //课程在线咨询列表
    Route::get('course/consultstate','Course\CourseController@consultationState');
    Route::get('course/is_new','Course\CourseController@is_new');
    Route::post('course/live/setting','Course\CourseController@liveSet');//直播设置
    Route::get('course/live/list','Course\CourseController@liveList');//直播列表
    Route::get('courseMessage/push/{id}','Course\CourseController@allMessagePush')->where(['id'=>'[0-9]+']);
    Route::post('courseClass/push','Course\CourseController@dealMessagePush');//课程推送
    Route::post('define/push/type','Course\CourseController@messagePush');//定义课程文章专题推送
    Route::post('courseClass/define/push','Course\CourseController@defineMessasgePush');//课程推送
    Route::post('course/live','Course\CourseController@courseLive');//直播设置
    Route::post('course/live/show','Course\CourseController@liveShow');//直播设置
	Route::get('courseLearn/card','Course\CourseExperienceCardController@index');//免费卡列表
	Route::get('course/card/create','Course\CourseExperienceCardController@create');//免费卡列表
	Route::post('course/card/postCreate','Course\CourseExperienceCardController@postCreate');//免费卡列表
	Route::post('course/card/updateState','Course\CourseExperienceCardController@updateState');//课程上下架
	Route::get('course/card/edit/{id}','Course\CourseExperienceCardController@edit');//课程上下架
	Route::post('course/card/postEdit','Course\CourseExperienceCardController@postEdit');//课程上下架
	Route::get('course/card/record/{id}','Course\CourseExperienceCardController@cardRecords');//课程上下架
	Route::get('course/collect/{id}','Course\CourseController@collectCount');//课程收藏统计
	Route::post('course/free/watch','Course\CourseController@freeWatch');//用户注册免费设置
	Route::get('train/course','Course\TrainController@index');//课程实战
	Route::get('train/course/list','Course\TrainController@courseList');//课程列表
	Route::get('train/course/add','Course\TrainController@add');//课程页
	Route::get('train/course/select','Course\TrainController@selectCourse');//挑选课程
	Route::get('train/course/buyed','Course\TrainController@getGroupFlow');//挑选课程
	Route::post('train/course/create','Course\TrainController@postCreate');//创建课程
	Route::get('train/course/edit','Course\TrainController@edit');//编辑课程页
	Route::get('train/course/postEdit','Course\TrainController@postEdit');//编辑课程页
	Route::get('train/user/reserve','Course\TrainController@reserveInfo');//编辑课程页
	Route::get('train/buy/export','Course\TrainController@exportGroupLog');//导出购买记录
	Route::get('train/periods','Course\TrainController@periods');//导出购买记录
	Route::get('train/periods/add','Course\TrainController@addPeriods');//添加组合期数
	Route::post('train/periods/postPeriods','Course\TrainController@createPeriods');//创建组合期数
	Route::get('train/periods/edit','Course\TrainController@editPeriods');//编辑组合期数
	Route::post('train/periods/editPeriods','Course\TrainController@poseEditPeriods');//编辑提交
	Route::post('train/periods/setShow','Course\TrainController@setShow');//编辑提交
	Route::get('finance/group/flow','Course\TrainController@getGroupFlow');//编辑课程页

	Route::get('train/ask/zuoye/{id}','Course\TrainController@zuoye');	//课程组作业列表
	Route::get('train/ask/answer/{qid}','Course\TrainController@answer'); //课程组作业列表--回答列表
	Route::post('train/ask/tcomment','Course\TrainController@teacherCommentGet');    //问答专区查看导师点评
	Route::post('train/ask/tcommenta','Course\TrainController@teacherCommentAdd');   //问答专区添加导师点评
	//新课速递
	/*
	 * 新手指南
	*/
	Route::get('help/index','Help\HelpController@index');
	Route::get('help/add','Help\HelpController@add');
	Route::post('help/create','Help\HelpController@create');
	Route::get('help/delete','Help\HelpController@destroy');
	Route::get('help/update','Help\HelpController@edit');
	Route::post('help/store','Help\HelpController@store');
	Route::get('help/feedback','Help\HelpController@feedback');
	Route::get('help/feedDel','Help\HelpController@feedDel');
	Route::get('help/feedUpdate','Help\HelpController@feedUpdate');
	/**
	 * 课程评论
	 */
	
	Route::get('comment/index','Comment\CommentController@index');	
	Route::get('comment/destroy','Comment\CommentController@destroy');	
	Route::get('comment/article','Comment\CommentController@article');	//文章评论
	Route::get('comment/article_destroy','Comment\CommentController@article_del');	//文章评论
	/*
	 * 财务相关
	 */
	Route::get('finance/flow','F\FinanceController@index');
	Route::get('finance/export','F\FinanceController@flowExport');//导出报表
	Route::get('apply/withdraw','F\ApplyController@index');

	Route::get('balance/index','F\BalanceController@index'); 	//用户余额
	Route::get('balance/detail','F\BalanceController@detail'); 	//用户余额


	/**
	 * 赛普币规则
	 */
	Route::get('rules/index','Rules\RulesController@index');
	Route::get('rules/add','Rules\RulesController@create');
	Route::post('rules/store','Rules\RulesController@store');
	Route::get('rules/edit','Rules\RulesController@edit');
	Route::get('rules/del','Rules\RulesController@destroy');
	Route::post('rules/update','Rules\RulesController@update');


	Route::get('apply/agree','F\ApplyController@agreePay');
	Route::get('apply/detail','F\ApplyController@detail');
	Route::post('apply/upload','F\ApplyController@postEvidence');
	Route::post('apply/postAgree','F\ApplyController@postAgreePay');
	Route::post('apply/deny','F\ApplyController@denyApply');

	/**
	 * 上传视频
	 */
	Route::get('video/index','Video\UploadVideoController@index');
	Route::get('video/add','Video\UploadVideoController@create');
	Route::post('video/store','Video\UploadVideoController@store');
	Route::post('video/newStore','Video\UploadVideoController@newStore');
	Route::get('video/edit','Video\UploadVideoController@edit');
	Route::get('video/deleteVideo','Video\UploadVideoController@deleteData');
	Route::get('transcoding/data','Video\TranscodingController@index');  //视频转码
	Route::get('video/delVideo','Video\UploadVideoController@delVideo');  //删除旧视频

	/**
	 * 赛事管理
	 */
	Route::get('match/index','Match\MatchController@index');              //赛事列表
	Route::get('match/add','Match\MatchController@matchAdd');             //赛事主题添加


	//七牛云
	
	Route::get('qiniu/add','Video\QiniuController@add'); //视频上传
	Route::post('qiniu/store','Video\QiniuController@store'); //视频上传
	Route::get('qiniu/getUpToken','Video\QiniuController@getUpToken'); //视频上传

	Route::get('qiniu/result/{id}','Video\QiniuController@result_video'); 		//骑牛转码视频接收

	/**
	 * 微信公众号管理
	 */

/**
 * 微信菜单栏
 */
	Route::get('wechat/menu','Wechat\WechatController@menu'); //微信自定义菜单栏
	Route::get('wechat/menuAdd','Wechat\WechatController@menuAdd');
	Route::post('wechat/menuStore','Wechat\WechatController@menuStore');
	Route::post('wechat/dataUpdate','Wechat\WechatController@dataUpdate');
	Route::get('wechat/menuUpdate','Wechat\WechatController@menuUpdate');
	Route::get('wechat/menuDelete','Wechat\WechatController@menuDelete');
	Route::get('wechat/generate','Wechat\WechatController@generate'); //生成菜单栏

//	Route::get('wechat/menu','Wechat\WechatController@setMenu');         		 //自定义设置微信公众号菜单
	Route::get('wechat/token','Wechat\WechatController@getToken');	     		 //获取token
	Route::get('wechat/addimg','Wechat\WechatController@addImg');		 		 //课程添加素材
	Route::any('wechat/upload','Wechat\WechatController@uplodeTmp');	 		 //测试上传微信素材
	Route::get('wechat/list','Wechat\WechatController@courselist');	     		 //查看课程素材列表
	Route::post('wechat/insert','Wechat\WechatController@updateImg');	 		 //编辑课程素材
	Route::get('wechat/news','Wechat\WechatController@news');	         		 //微信关注后自动回复图文列表
	Route::get('wechat/addnew','Wechat\WechatController@addNew');		 
	Route::post('wechat/insertnew','Wechat\WechatController@insertNew'); 		 //执行编辑微信图文信息
	Route::get('wechat/editnew/{id}','Wechat\WechatController@editNew'); 		 //编辑微信图文页面 
	Route::post('wechat/delnew','Wechat\WechatController@delNew');       		 //ajax执行删除微信图文信息   
	Route::any('wechat/uploadMedia','Wechat\WechatController@uploadMedia');	     //上传微信素材	
	Route::get('wechat/cqrcode','Wechat\WechatController@createdQrcode');	     //生成带参数二维码	

	/**
	 * 微信自定义回复消息
	 */
	Route::get('wechatReply/index','Wechat\WechatReplyController@index');	//首页
	Route::get('wechatSet/list','Wechat\WechatReplyController@setList');	//微信关键字列表
	Route::get('wechatSet/keywordAdd','Wechat\WechatReplyController@keywordAdd');	//微信关键字创建
	Route::get('wechatSet/keywordEdit','Wechat\WechatReplyController@keywordEdit');	//微信关键字编辑
	Route::post('wechatSet/postKeywordSet','Wechat\WechatController@postKeywordSet');	//微信关键字创建
	Route::post('wechatSet/updateKeywordSet','Wechat\WechatController@updateKeywordSet');	//微信关键字更新
	Route::post('wechatSet/delete','Wechat\WechatReplyController@keywordDelete');//微信关键字删除
	Route::post('wechatSet/updateState','Wechat\WechatReplyController@updateState');//微信关键字删除
	Route::get('wechatSet/push/list','Wechat\WechatController@setList');//推送课程信息列表
	Route::get('wechatSet/push/set','Wechat\WechatController@postCourseSet');//推送课程设置
	Route::post('wechatSet/push/postCreate','Wechat\WechatController@postSetCreate');//推送课程设置
	Route::get('wechatSet/push/updateSet','Wechat\WechatController@setCourseUpdate');//推送课程设置
	Route::post('wechatSet/push/setCourseUpdate','Wechat\WechatController@postCourseUpdate');//推送课程设置
	Route::get('course/choose','Course\CourseController@selectCourse');//选择课程
	Route::get('wechatReply/add','Wechat\WechatReplyController@add');
	Route::get('wechatReply/edit','Wechat\WechatReplyController@update');	
	Route::post('wechatReply/store','Wechat\WechatReplyController@store');	
	Route::post('wechatReply/updateData','Wechat\WechatReplyController@updateData');	
	Route::get('wechatReply/del','Wechat\WechatReplyController@del');


	/**
	 * 文章管理
	 * 20180925
	 */
	Route::get('type/list','Article\ArticleController@Types');	          			//文章类别管理
	Route::get('type/add','Article\ArticleController@typeAdd');	          			//新增文章类别
	Route::post('type/insert','Article\ArticleController@typeInsert');    			//执行插入文章类别
	Route::get('type/edit/{id}','Article\ArticleController@typeEdit');    			//编辑文章类别
	Route::get('type/state','Article\ArticleController@typeState');	      			//修改文章类别状态
	Route::get('type/isindex','Article\ArticleController@typeIsindex');	 			//修改文章类别是否首页显示
	Route::get('search/index','Search\SearchController@index');	          			//热搜关键字列表 
	Route::post('search/add','Search\SearchController@addKeyword');	      			//热搜关键词添加/编辑
	Route::post('search/del','Search\SearchController@deleteKeyword');    			//ajax删除热搜关键词
	Route::get('article/add','Article\ArticleController@articleAdd');	  			//文章新增页面
	Route::any('article/insert','Article\ArticleController@articleInsert');			//执行文章添加
	Route::get('article/list','Article\ArticleController@articleList');	  			//执行文章添加
	Route::post('article/changestate','Article\ArticleController@changeState');		//修改文章状态
	Route::post('article/changeindex','Article\ArticleController@changeIndex');		//修改文章是否首页显示
	Route::post('article/changeselected','Article\ArticleController@changeSelected');//修改文章是否精选	
	Route::post('article/delete','Article\ArticleController@delete');		//执行删除文章
	Route::get('article/edit','Article\ArticleController@articleEdit');				//编辑文章页面
	Route::get('article/choose','Article\ArticleController@articleChoose');				//文章列表页面
	Route::get('theme/choose','Article\ArticleController@themeChoose');				//文章专栏页面
	Route::get('article/recommend','Article\ArticleController@recommendList');	  	//推荐文章列表
	Route::get('recommend/state','Article\ArticleController@recommendState');	  	//修改推荐文章状态
	Route::get('article/addcomment','Article\ArticleController@addComment');		//文章添加评论页面
	Route::post('article/insertcomment','Article\ArticleController@insertComment'); //执行添加文章评论
	
	Route::get('article/post/{article_id}','Article\ArticleController@post_baidu');	   //临时测试地址

	/**
	 * 网站设置
	 */
	Route::get('establish/index','Establish\EstablishController@index');	
	Route::post('establish/add','Establish\EstablishController@add');	
	Route::get('establish/update','Establish\EstablishController@updateSite');	
	Route::post('establish/updateCache','Establish\EstablishController@updateCache');	
	Route::get('establish/showcache','Establish\EstablishController@showCache');
	Route::get('establish/showAllKey','Establish\EstablishController@showAllKey');		//显示所有缓存值
	Route::get('establish/updateType','Establish\EstablishController@updateType');		//更新所有缓存值
	/**
	 * 社区活动
	 */
	
	Route::get('activity/list','Course\ActivityController@index');	            //社区活动首页
	Route::get('activity/add','Course\ActivityController@create'); 	            //活动添加也
	Route::post('activity/store','Course\ActivityController@store'); 	        //活动添加也
	Route::get('activity/edit/{id}','Course\ActivityController@edit'); 	        //活动修改
	Route::post('activity/update/{id}','Course\ActivityController@update'); 	//活动修改
	Route::get('activity/del/{id}','Course\ActivityController@destroy'); 	    //删除
	Route::get('activity/data','Course\ActivityController@showDate'); 	        //20190117 临时查看数据
	Route::get('activity/jdcard','Course\ActivityController@jdCard'); 	        //京东卡列表  临时活动素材
	Route::get('activity/addjdcard','Course\ActivityController@addJdCard'); 	//导入京东卡  临时活动素材

	Route::get('activity/new/{aid}.html','Course\ActivityController@new_year');	//新年助力活动


	/**
	 * 专题文章
	 */
	Route::get('special/index','Special\SpecialController@index');					        //专题列表
		
	Route::get('special/addSpecial','Special\SpecialController@createSpecial');		        //添加专题
	Route::post('special/store','Special\SpecialController@store');					        //存储
	Route::post('special/delete','Special\SpecialController@delete_special');		        //删除专题
	Route::get('special/edit_special/{id}','Special\SpecialController@edit_special');       //编辑专题
	Route::post('special/changeState','Special\SpecialController@changeState');		        //修改状态

	Route::get('special/articleList/{id}','Special\SpecialController@articleList');		    //文章列表
	Route::get('special/articleDel/{aid}/{id}','Special\SpecialController@articleDel');		//文章列表
	Route::get('thematic/news/push','Special\SpecialController@thematicPush');		        //文章列表

	/**
	 * 分销管理
	 */
	Route::get('dis/video','Distribution\DisController@video');                             //分销打卡视频列表
	Route::get('dis/videoa','Distribution\DisController@videoAdd');							//分销打卡视频添加页面
	Route::post('dis/videoi','Distribution\DisController@videoInsert');                     //分销视频打卡执行添加
	Route::get('dis/videou/{id}','Distribution\DisController@videoUpdate');			        //分销视频编辑管理
	Route::post('dis/videod','Distribution\DisController@videoDelete');						//分销视频删除操作
	Route::get('dis/course','Distribution\DisController@course');				            //分销视频课程管理
	Route::get('dis/list','Distribution\DisController@distributor');					    //分销管理课程顾问
	Route::get('dis/coursea','Distribution\DisController@courseAdd');                       //分销课程添加课程页面
	Route::get('dis/coursem','Distribution\DisController@selectDisCourse');					//分销课程关联视频
	Route::post('dis/coursei','Distribution\DisController@courseInsert');                   //分销打卡课程执行添加
	Route::post('dis/coursed','Distribution\DisController@courseDelete');					//分销打卡课程执行删除
	Route::get('dis/courseu/{id}','Distribution\DisController@courseUpdate');				//分销课程编辑页面
	Route::post('dis/form/code','Distribution\DisController@formCode');					    //审核课程顾问申请
	Route::post('dis/form/mobile','Distribution\DisController@formMobile');					//审核课程顾问申请


});
Route::post('qiniu/del_qivideo/{vid}','Video\QiniuController@del_old_video'); 		//删除原视频

